package com.blyat.xsoft.admin.restful.controller;

import com.blyat.xsoft.admin.restful.entity.Authority;
import com.blyat.xsoft.admin.restful.service.AuthorityService;
import com.blyat.xsoft.kernel.restful.controller.BaseController;
import com.blyat.xsoft.kernel.restful.view.ResultModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: syh
 * @Date: 2020/8/26
 * @Description:
 */
@RestController
@RequestMapping("authority")
public class AuthorityController extends BaseController<Authority, AuthorityService> {

    @Autowired
    private AuthorityService authorityService;

    @RequestMapping("tree")
    public ResultModel current() {
        return ResultModel.SUCCESS(authorityService.getAuthorityTree(null));
    }

}
